This chapter describes the OPCON interface configuration and operational commands. It includes the following sections:
The Operator Console process (OPCON) is the root-level process of the device software user interface. The main function of OPCON is to communicate with processes at the secondary level, such as Configuration, Console, and Event Logging. Using OPCON commands, you may also:
When the device starts for the first time, a boot message appears on the console. Then the OPCON prompt (*) appears on the console, indicating that the OPCON process is active and ready to accept commands.
The OPCON process allows you to configure, change, and monitor all of the device's operating parameters. While in the OPCON process, the device is forwarding data traffic. When the device is booted and enters OPCON, a copyright logo and an asterisk (*) prompt appears on the locally attached console terminal. This is the OPCON (OPerator's CONsole) prompt, the main user interface that allows access to second-level processes.
Some changes to the device's operating parameters made while in OPCON take effect immediately without requiring reinitializing of the device. If the changes do not take effect, use the restart or reload command at the * prompt.
At the * prompt, an extensive set of commands enables you to check the status of various internal software processes, monitor the performance of the device's interfaces and packet forwarders, and configure various operational parameters.
This section describes the OPCON commands. Commands that are needed
more often appear before the "- - - - -" separator. Each command
includes a description, syntax requirements, and an example. The OPCON
commands are summarized in Table 3. To use them, access the OPCON process and enter the
appropriate command at the OPCON prompt (*).
Command | Function |
---|---|
? (Help) | Displays all the commands available for this command level or lists the options for specific commands (if available). See "Getting Help". |
Configuration* | Accesses the device's configuration process. (talk 6) |
Console* | Accesses the device's console process. (talk 5) |
Event Logging System* | Accesses the device's event logging process. (talk 2) |
ELS Console* | Accesses the device's secondary ELS Console process. (talk 7) |
Logout | Logs off a remote console. |
Ping | Pings a specified IP address. |
Reload | Reloads the device. |
Telnet | Connects to another device. |
- - - - - - | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
Breakpoint | Enters the MOS system debugging tool. |
Divert | Sends the output from a process to a console or other terminal. |
Flush | Discards the output from a process. |
Halt | Suspends the output from a process. |
Intercept | Sets the OPCON default intercept character. |
Memory | Reports the device's memory usage. |
Pause | Suspends EasyStart (for EasyStart only). |
Restart | Restarts (but does not reload) the device software. |
Status | Shows information about all device processes. |
Stop | Stops EasyStart and enters Config Only mode (for EasyStart only). |
Suspend | Temporarily disables Command Completion for the current session only. |
Talk | Connects to another device process and enables the use of its commands. |
* When you use this command for the first time, you will be reminded that you can use Ctrl-P to return to the MOS Operator Console prompt (*).
Use the breakpoint command to trap information in the MOS system debugging tool, inspect memory, place breakpoints, or obtain a core dump. This command should be used only by software specialists.
If the watchdog timer is on when you invoke this command, the contents of core memory are dumped (if dumping is enabled) when the watchdog timer fires. All routing processes are halted.
The breakpoint command must be issued from a local console.
Note: | Do not use this command during normal operations because it completely halts operation of the software. If you accidentally enter the breakpoint command, quickly press Esc, and then p. |
Syntax:
Use the configuration command to access the device's configuration process (talk 6). See "The CONFIG Process (CONFIG - Talk 6) and Commands" for more information.
Syntax:
Example:
* configuration (To return to the MOS Operator Console prompt (*), press Control-P) Gateway user configuration Config>
Use the console command to access the device's console and monitoring process (talk 5). See "The Operating/Monitoring Process (GWCON - Talk 5) and Commands" for more information.
Syntax:
Example:
* console CGW Operator Console +
Use the divert command to send the output from a specified process to a specified terminal. This command allows you to divert the output of several processes to the same terminal to simultaneously view the output. The divert command is commonly used to redirect MONITR output messages to a specific terminal. The device allows only certain processes to be redirected.
The divert command requires the PID and tty# (number of the output terminal). To obtain these values, use the OPCON status command. The terminal number can be the number of either the local console (tty0) or one of the remote consoles (tty1, tty2). The following example shows Event Logging System messages generated by the MONITR process (2) being sent to a remote console tty1 (1).
Event messages are displayed immediately even though you may be in the middle of typing a command. The display and keyboard have separate buffers to prevent command confusion. The following example shows the MONITR process connected to TTY0 after executing the divert 2 0 command. If you want to stop the output, enter halt 2. The halt command is described in "Halt".
Syntax:
Example:
Copyright Notices: Copyright IBM Corp. 1994, 1997 MOS Operator Console For help using the Command Line Interface, press ESCAPE, then '?' * divert 2 0 * status Pid Name Status TTY Comments 1 COpCN1 IOW TTY0 gzs 2 Monitr IDL TTY0 3 Tasker RDY -- 4 MOSDDT DET -- 5 CGWCon DET -- 6 Config DET -- 7 Ezystrt IDL -- 8 ROpCN1 IDL TTY1 9 ROpCN2 RDY TTY2 jlg@128.185.40.40 10 CES3 IDL -- 11 TOUT IDL -- 12 L2S3 IDL -- 13 L3L2 IDL -- 14 LLL2 IDL -- 15 S3CE IDL --
Use the event command to access the device's event logging process, (talk 2). See "Using the Event Logging System (ELS)" for more information.
Syntax:
Use the flush command to clear the output buffers of a process. This command is generally used before displaying the contents of the MONITR's FIFO buffer to prevent messages from scrolling off the screen. Accumulated messages are discarded.
The device allows only certain processes to be flushed. To obtain the PID and tty#, use the OPCON status command. In the following example, after executing the flush 2 command, the output of the MONITR process is sent to the Sink (it has been flushed).
Syntax:
Example:
* flush 2 * status Pid Name Status TTY Comments 1 COpCN1 IOW TTY0 2 Monitr IDL SNK 3 Tasker RDY -- 4 MOSDDT DET -- 5 CGWCon DET -- 6 Config DET -- 7 Ezystrt IDL -- 8 ROpCN1 IDL TTY1 9 ROpCN2 RDY TTY2 jlg@128.185.40.40
Use the halt command to suspend all subsequent output from a specified process until the divert, flush, or talk OPCON command is issued to the process. The device cannot redirect all processes. Halt is the default state for output from a process. To obtain the PID for this command, use the OPCON status command. In the following example, after executing the halt 2 command, the MONITR process is no longer connected to TTY0. Event messages no longer appear.
Syntax:
Example:
* halt 2 * status Pid Name Status TTY Comments 1 COpCN1 IOW TTY0 gzs 2 Monitr IDL -- 3 Tasker RDY -- 4 MOSDDT DET -- 5 CGWCon DET -- 6 Config DET -- 7 Ezystrt IDL -- 8 ROpCN1 IDL TTY1 9 ROpCN2 RDY TTY2 jlg@128.185.40.40
Use the intercept command to change the OPCON intercept character. The intercept character is what you enter from other processes to get back to the OPCON process. The default intercept key combination is Ctrl-P.
The intercept character can be a control character. Enter the ^ (shift 6) character followed by the letter character or non-alphanumeric character, such as !@#$%, you want for the intercept character.
Note: | This change applies to only the current login session. |
Syntax:
Example 1:
* intercept ^a
From this example, the intercept character is now Ctrl-A.
Example 2:
* intercept !
From this example, the intercept character is now !.
Use the logout command to terminate the current session for the user who enters the logout command. If the console login is enabled, this command will require the next user to log in using an authorized userid/password combination. If the console login is not enabled, the OPCON prompt appears again.
Syntax:
Use the memory command to obtain and display information about the device's global heap memory usage. The display helps you to determine if the device is being utilized efficiently. For an example of memory utilization, see Figure 3.
See Memory for memory usage via talk 5.
Syntax:
Example:
* memory Number of bytes: Busy = 319544, Idle = 1936, Free = 1592
Note: | The sum of the Idle and Free memory equals the total available heap memory. |
*---------------* *----------------* *----------------* | | | | |Free=1128 | |Free=1393515 | |Free=103068 | |----------------| | | | | | | | | |----------------| |Idle=103068 | |---------------|<*Water |Idle=1128 | | | |Idle=1128 | Mark *----------------* *----------------* *---------------* | | | | | | | | | | |Busy=103068 | |Busy=1393515 | |Busy=1393515 | | | | | | | *---------------* *----------------* *----------------* Under-Utilized Properly Utilized Over-Utilized |
Use the pause command to suspend the EasyStart function. Use this command only when debugging the device. After completing your debugging session, enter the restart command to restart the device and resume the EasyStart function. The device will reenter EasyStart.
Syntax:
Example:
pause Entering EasyStart operation. Type 'stop' to terminate. ELS messages are automatically displayed in this mode. EasyStart> EZ.001: Starting. EZ.007: Waiting up to 6 seconds for devices to pass self-test. pause * restart Are you sure you want to restart the gateway? (Yes or [No]): yes Copyright Notices: Copyright IBM Corp. 1994, 1997 MOS Operator Console Entering EasyStart operation. Type 'stop' to terminate. ELS messages are automatically displayed in this mode. EasyStart> EZ.001: Starting. EZ.007: Waiting up to 60 seconds for devices to pass self-test. BTP.010: net 0, int TKR/0, Sent client request (htype: 6) BTP.011: net 1, int FR/0, Could not snd client req because: Ifc not up BTP.011: net 2, int FR/1, Could not snd client req because: Ifc not up BTP.011: net 3, int FR/2, Could not snd client req because: Ifc not up
Use the ping command to have the device send ICMP Echo messages to a given destination (that is, "pinging") and watch for a response. This command can be used to isolate trouble in the internetwork.
Syntax:
The ping process is done continuously, incrementing the ICMP sequence number with each additional packet. Each matching received ICMP Echo response is reported with its sequence number and the round-trip time. The granularity (time resolution) of the round-trip time calculation is usually around 20 milliseconds, depending on the platform.
To stop the ping process, type any character at the console. At that time, a summary of packet loss, round-trip time, and number of unreachable ICMP destinations will be displayed.
When a broadcast or multicast address is given as destination, there may be multiple responses printed for each packet sent, one for each group member. Each returned response is displayed with the source address of the responder.
You can specify the size of the ping (number of data bytes in the ICMP message, excluding the ICMP header), value of the data, time-to-live (TTL) value, rate of pinging, and TOS bits to set. You can also specify the source IP address. If you do not specify the source IP address, the device uses its local address on the outgoing interface to the specified destination. If you are validating connectivity from any of the device's other interfaces to the destination, enter the IP address for that interface as the source address.
Only the destination parameter is required; all other parameters are optional. By default the size is 56 bytes, the TTL is 64, the rate is 1 ping per second, and the TOS setting is 0. The first 4 bytes of the ICMP data are used for a timestamp. By default the remaining data is a series of bytes with values that are incremented by 1, starting at X'04', and rolling over from X'FF' to X'00' (for example, X'04 05 06 07 . . . FC FD FE FF 00 01 02 03 . . .'). These values are incremented only when the default is used; if the data byte value is specified, all of the ICMP data (except for the first 4 bytes) is set to that value and that value is not incremented. For example, if you set the data byte value to X'FF', the ICMP data is a series of bytes with the value X'FF FF FF . . .'.
Example:
* ping Destination IP address [0.0.0.0]? 192.9.200.1 Source IP address [192.9.200.77]? Ping data size in bytes [56]? Ping TTL [64]? Ping rate in seconds [1]? Ping TOS (00-FF) [0]? e0 Ping data byte value (00-FF) [ ]? PING 192.9.200.77-> 192.9.200.1:56 data bytes,ttl=64,every 1 sec. 56 data bytes from 192.9.200.1:icmp_seq=0.ttl=255.time=0.ms 56 data bytes from 192.9.200.1:icmp_seq=1.ttl=255.time=0.ms 56 data bytes from 192.9.200.1:icmp_seq=2.ttl=255.time=0.ms ----192.9.200.1 PING Statistics---- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max=0/0/0 ms
Use the reload command to reboot the device by loading in a new copy of the device software.
When you use this command from a remote console, you install a new software load without going to the device. This command executes the same functions as pressing the reset button except that the device will not dump (if so configured). Before the reload takes effect, you are prompted to confirm the reload. You are also prompted if you have not saved the configuration changes.
Syntax:
Example:
* reload Are you sure you want to reload the gateway (Yes or No)?
Use the restart command to reinitialize the software. After you reinitialize the software, a bus reset occurs. This causes the connected network interfaces to self-test, all routing tables to clear, and any packets in the device to drop. Before the restart takes effect, you are prompted to confirm the restart.
Note: | If you use this command from a remote console, your Telnet session will be lost because all device processes are being restarted. |
Syntax:
Example:
* restart Are you sure you want to restart the gateway (Yes or No)? Yes Copyright Notices: Copyright IBM Corp. 1994, 1997 MOS Operator Console For help using the Command Line Interface, press ESCAPE, then '?' *
Use the status command to display information about all device processes. By entering the PID after the status command, you can look at the status of only the desired process. The following example shows the total status display.
Syntax:
Example:
* status Pid Name Status TTY Comments 1 COpCN1 IOW TTY0 2 Monitr IDL -- 3 Tasker RDY -- 4 MOSDDT DET -- 5 CGWCon IOW -- 6 Config IOW TTY1 7 Ezystrt IDL -- 8 ROpCN1 IOW TTY1 128.185.46.101 9 ROpCN2 RDY TTY2 128.185.46.104
Use the stop command to stop the EasyStart function and enter Config-only mode. For information about Config-only mode, see "Config-Only Mode".
Syntax:
Example:
* stop EasyStart> EZ.001: Starting. EZ.007: Waiting up to 6 seconds for devices to pass self-test. stop EZ.006: All dlinks/parameters tried but failed; resetting to def values. EZ.009: *** Restarting Router *** No Protocols Configured. Entering Quick Config Router Quick Configuration for the following: o Interfaces o Bridging Spanning Tree Bridge (STB) Source Routing Bridge (SRB) Source Routing/Transparent Bridge (SR/TB) Source Routing Transparent Bridge (SRT) o Protocols IP (including OSPF, RIP and SNMP) o Booting Event Logging will be enabled for all configured subsystems with logging level 'Standard' ********************************************************** Interface Configuration ********************************************************** Type 'Yes' to Configure Interfaces Type 'No' to skip Interface Configuration Type 'Quit' to exit Quick Config Configure Interfaces? (Yes, No, Quit): [Yes] q Quick Config Done Config (only)>
Use the suspend command to temporarily disable Command Completion for the current session only. If you are using an automated script, you can issue suspend yes as the first command if you want to temporarily disable Command Completion.
For information about Command Completion, see "Command Completion".
Syntax:
You can use the configuration, console, or event commands to connect to other processes, such as CONFIG, GWCON, or MONITR, or use the talk command. After connecting to a new process, you can send specific commands to and receive output from that process. You cannot talk to the TASKER or OPCON processes.
To obtain the PID, use the OPCON status command. Once you are connected to the second-level process, such as CONFIG, use the intercept character, Ctrl-P, to return to the * prompt.
Syntax:
Example:
* talk 5 CGW Operator Console +
When using third-level processes, such as SNMP Config> or SNMP>, use the exit command to return to the second level.
Use the telnet command to remotely attach to another device or to a remote host. The only optional parameter is the terminal type that you want to emulate.
You can use the telnet command with IPv4 or with IPv6 addresses.
A device has a maximum of five Telnet sessions: two servers (inbound to the device), and three clients (outbound from the device).
Note: | To use Telnet in a pure bridging environment, enable Host Services. |
Syntax:
Example 1: telnet 128.185.10.30 or telnet 128.185.10.30 23 or telnet 128.185.10.30 vt100
Trying 128.185.10.30 ... Connected to 128.185.10.30 Escape character is '^]'
Example 2: telnet 1:9::10
Trying 1:9::10 ... Connected to 1:9::10 Escape character is '^]'
When Telneting to a non-existent IP address, the device displays:
Trying 128.185.10.30 ...
To enter the Telnet command mode, type the escape character-sequence, which is Ctrl-], at any prompt.
telnet>
If you Telnet into a device,
Note: | When using a VT100 terminal, do not press < Backspace because it inserts invisible characters. Press Delete to delete the last character. |
The Telnet command mode consists of the following subcommands:
The status and send subcommands have one of two responses depending on whether or not the user is connected to another host. For example:
telnet> status Connected to 128.185.10.30 Operating in character-at-a-time mode. Escape character is ^]. telnet> send ayt
Note: | The send command currently supports only ayt. |
telnet> status Need to be connected first. telnet> send ayt Need to be connected first.
Use the close subcommand to close a connection to a remote host and terminate the Telnet session. Use the quit subcommand to exit the telnet command mode, close a connection, and terminate a Telnet session.
telnet> close
or
telnet> quit logout *